#include "../comm.h"
class Solution {
public:
    int maxOperations(vector<int>& nums) {
      int sum = nums[0] + nums[1];
      int n = 1;
      for(int i = 3; i < nums.size(); i += 2)
      {
            int tmp = nums[i] + nums[i - 1];
            if(tmp != sum) return n;
            ++n;
      }  
      return n;
    }
};